package com.core.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 角色资源关联
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class RoleResourceDto implements Serializable {
	/** 创建时间 */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;
	/** id */
	private String id;
	/** 资源|id */
    @NotEmpty(message = "资源|id必填")
	private String resourceId;
	/** 角色|id */
    @NotEmpty(message = "角色|id必填")
	private String roleId;

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public String getId() {
		return this.id;
	}
	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}
	
	public String getResourceId() {
		return this.resourceId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
	public String getRoleId() {
		return this.roleId;
	}

	
    
    @Override
    public String toString() {
        return "RoleResource{" +
		"createTime=" + createTime +
		",id='" + id + "'" + 
		",resourceId='" + resourceId + "'" + 
		",roleId='" + roleId + "'" + 
                '}';
    }
	
}